<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<input class="d1" type="text" />
	<input class="d2" type="text" />
	<input type="button" value="传参" onclick="chuancan()"/>
	<body>
	</body>
</html>
<script src="../js/jquery-3.1.1.min.js"></script>
<script>
		function chuancan(){
		var a  = $("input:eq(0)").val();
		var b  = $("input:eq(1)").val();
		alert(a);
		alert(b);
		}
	
	
</script>